package models

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Username string `gorm:"type:varchar(50)"`
	Password string `gorm:"type:varchar(255)"`
}

type Role struct {
	gorm.Model
	UserID   int    `gorm:"type:int"json:"user_id"`
	User     User   `gorm:"foreignKey:UserID"json:"user"`
	RoleName string `gorm:"type:varchar(50)"`
}

type Power struct {
	gorm.Model
	RoleID    int    `gorm:"type:int"json:"role_id"`
	Role      Role   `gorm:"foreignKey:RoleID"json:"role"`
	PowerName string `gorm:"type:varchar(50)"`
}
